import Cookies from 'js-cookie'

const TokenKey = 'vue_admin_template_token'

const timekey = 'hrsass-timestamp-key1212121212'

// 从cookies中获取token存储的时间戳
export function getTimestamp() {
  return Cookies.get(timekey)
}
// 存储获取到token时的时间戳
export function setTimestamp() {
  return Cookies.set(timekey, Date.now())
}
export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}
